﻿using System;
using Microsoft.Cmp.Framework;
using Microsoft.SisparkSaaS.DAL.Common;


namespace Microsoft.Cmp.MailService
{
    internal static class Program
    {
        private static void Main()
        {
            SendMail();
        }

        private static void SendMail()
        {
            try
            {
                var sendEMail = new SendEMail(new WSBO_SendNoticeEmailDAL());
                sendEMail.Execute();
            }
            catch (Exception ex)
            {
                //记录Windows异常
                Log.Error("发送邮件服务异常",
                          string.Format("错误描述：{0}，堆栈信息：{1}", ex.Message, ex.StackTrace),
                          string.Empty,
                          System.Diagnostics.TraceEventType.Error);
            }
        }
    }
}
